|
|
|
|
|
|
|
In Figure 18.5, list boxes could have just as easily been used for the selection criteria. However, using a combo box is more appropriate because it saves space while still accomplishing the intended task. |
|
|
|
|
|
|
|
|
See "The Combo Box," p. 75 |
|
|
|
|
|
|
|
|
Third-party custom controls are useful; however, you should not use them unless doing so is really necessary. Picking a control included with VB over a third-party control offers several advantages: |
|
|
|
|
|
|
|
|
The chances are better that the control will be supported in future versions of VB. |
|
|
|
|
|
|
|
|
Distributing the control to users is easier. |
|
|
|
|
|
|
|
|
Many "native" VB controls, such as the Windows Common Controls, provide the users an interface with which they are already familiar. |
|
|
|
|
|
|
|
|
If your user interface will contain multiple forms, a major decision you have to make is whether to use a single-document interface (SDI) or a multiple-document interface (MDI). MDI applications, discussed in Chapter 17, "Multiple Document Interface Applications," handle multiple forms by enclosing them visually within a "parent" window. |
|
|
|
|
|
|
|
|
See "Introducing MDI Applications," p. 382 |
|
|
|
|
|
|
|
|
Forms in an SDI application appear as totally independent windows. Whether you use SDI or MDI, user interaction with forms initiates many program actions through form and control events. If you have multiple forms, you need to code the program so that the users are not allowed to disrupt the intended program flowfor example, show a data form that has not been populated yet. |
|
|
|
|
|
|
|
|
As an example of a potential problem with multiple forms, consider the two forms shown in Figure 18.6. |
|
|
|
|
|
|
|
|
Figure 18.6
Forms that your code treats as independent when
they really are not can cause unexpected errors. |
|
|
|
|
|